#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_pushButton_liveCapture_clicked()
{
    if(ui->widget->showingVideo)
        ui->systemMessages->setText("stoping camera......");
    else
        ui->systemMessages->setText("inicializing camera......");

    if( ui->widget->initCaptureFromCam()){
        ui->pushButton_liveCapture->setText("Stop");
    }else{
        ui->pushButton_liveCapture->setText("Live Capture");
    }
    ui->systemMessages->setText("Ready......");
}


void MainWindow::on_checkBox_UseGpu_stateChanged(int arg1)
{
    ui->widget->tracker.setUseGpu(arg1);
}
